package eleanor.ltd.isRealEstate.entities.user.group;

import java.io.Serializable;

import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.beaneditor.NonVisual;

import eleanor.ltd.isRealEstate.entities.roles.group.RolesGroup;
import eleanor.ltd.isRealEstate.entities.user.User;

@Entity
@Table(name = "usergroup")
public class UserGroup implements Serializable {
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@NonVisual
	@Column(name = "ugid")
	private Long id;
	@ManyToOne(optional = false)
	@JoinColumn(name = "rgid")
	private RolesGroup rolesGroup;
	@ManyToOne(optional = false)
	@JoinColumn(name = "uid")
	private User user;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public RolesGroup getRolesGroup() {
		return rolesGroup;
	}
	public void setRolesGroup(RolesGroup rolesGroup) {
		this.rolesGroup = rolesGroup;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	
	
	
}
